package com.daniel.design.pattern.decorator;

/**
 * @ClassName Bacon
 * @Description 培根类（具体装饰者角色）
 * @Author Daniel
 * @Version V1.0.0
 */
public class Bacon extends Garnish {

    public Bacon(FastFood fastFood) {
        super(2, "培根", fastFood);
    }

    @Override
    public double cost() {
        return getPrice() + getFastFood().getPrice();
    }

    @Override
    public String getDesc() {
        return super.getDesc() + getFastFood().getDesc();
    }
}
